using System;
using System.Collections.Generic;
using Godot;
using Godot.Collections;

/*
* 客户端
*/
public partial class MultiplayerScene
{
    public double machingTime = -1;
    public List<String> cilentMessages = new List<string>();
    public int onlineCount;
    public Player player;
    public InGame inGame;
    [Rpc(MultiplayerApi.RpcMode.AnyPeer, CallLocal = true)]
    public void TargetDisconnected()
    {
        inGame = null;
    }
    [Rpc(MultiplayerApi.RpcMode.AnyPeer, CallLocal = true)]
    public void SetInGame(Dictionary dict)
    {
        inGame = new InGame().Parse(dict);
        machingTime = -1;
    }
    [Rpc(MultiplayerApi.RpcMode.AnyPeer, CallLocal = true)]
    public void SetPlayer(Dictionary dict)
    {

        player = new Player().Parse(dict);
    }
    [Rpc(MultiplayerApi.RpcMode.AnyPeer, CallLocal = true)]
    public void SetId(long id)
    {
        this.player = new Player();
        player.id = id;
    }
    [Rpc(MultiplayerApi.RpcMode.AnyPeer, CallLocal = true)]
    public void SetOnlineCount(int Count)
    {
        onlineCount = Count;
    }
    [Rpc(MultiplayerApi.RpcMode.AnyPeer, CallLocal = true)]
    public void SetMessage(String str)
    {
        cilentMessages.Add(str);
    }
}